Skip to content

fix: disable pending message retry on app open - #5211

Closed
MohamadJaara wants to merge 1 commit into
developfrom
mo/disable-pending-retry-develop
Closed

MohamadJaara wants to merge 1 commit into
developfrom
mo/disable-pending-retry-develop

Conversation

@MohamadJaara

Copy link
Copy Markdown
Member

Goal

Prevent the foreground pending-message replay introduced in 4.32 from crashing the app when a persisted pending row contains content that cannot be encoded.

Reproduction

  1. Have a pending message whose persisted content is not valid for outbound protobuf encoding.
  2. Bring the app to the foreground.
  3. The global observer retries pending messages after sync and the mapper exception escapes the coroutine.

Change

  • Stop registering the app-open pending-message retry observer.
  • Update observer tests to assert foreground transitions do not trigger pending-message replay.
  • Keep existing explicit and manual resend paths unchanged.

A follow-up will harden pending-message encoding and re-enable the foreground trigger safely.

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.40%. Comparing base (27391e0) to head (11a2859).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5211      +/-   ##
===========================================
- Coverage    52.46%   52.40%   -0.07%     
===========================================
  Files          740      740              
  Lines        25735    25733       -2     
  Branches      4223     4222       -1     
===========================================
- Hits         13502    13485      -17     
- Misses       10942    10957      +15     
  Partials      1291     1291              
Files with missing lines Coverage Δ
.../kotlin/com/wire/android/GlobalObserversManager.kt 72.36% <ø> (-19.94%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27391e0...11a2859. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

2 620 tests  ±0   2 620 ✅ ±0   1m 49s ⏱️ +24s
  333 suites ±0       0 💤 ±0 
  333 files   ±0       0 ❌ ±0 

Results for commit 97c1a4a. ± Comparison against base commit 18b1028.

This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both.
com.wire.android.GlobalObserversManagerTest ‑ given app visible and valid session, when app opens, then retry sending pending messages()
com.wire.android.GlobalObserversManagerTest ‑ given valid session when app becomes visible then retry sending pending messages()
com.wire.android.GlobalObserversManagerTest ‑ given app visible and valid session, when app opens, then do not retry sending pending messages()
com.wire.android.GlobalObserversManagerTest ‑ given valid session when app becomes visible then do not retry sending pending messages()

@github-actions

Copy link
Copy Markdown
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@MohamadJaara
MohamadJaara force-pushed the mo/disable-pending-retry-develop branch from 97c1a4a to 11a2859 Compare August 31, 2026 12:23
@MohamadJaara

Copy link
Copy Markdown
Member Author

already fixed in develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant